function states_ = gXrandom_statelist(varargin)
varargin{:}
waitMove = { ...
    'dXkbHID',  {'f', 'slowDown', 'j', 'slowUp', 'h', 'beep', 1}; ...
    'dXgameHID', {[3:6]', 'beep', 7, 'slowDown', 8, 'slowUp', ...
    [1, -1], 'fastDown', [1, 1], 'fastUp', 1}};

waitConf = { ...
    'dXkbHID',  {'f', 'slowDownC', 'j', 'slowUpC', 'h', 'newNumber', 1}; ...
    'dXgameHID', {[3:6]', 'newNumber', 7, 'slowDownC', 8, 'slowUpC', ...
    [1, -1], 'fastDownC', [1, 1], 'fastUpC', 1}};

b = [1,7,8]';
goBack = { ...
    'dXkbHID',  {{['fj']',0}, 'waitMove'}; ...
    'dXgameHID', {[b,0*b], 'waitMove'}};

goBackC = { ...
    'dXkbHID',  {{['fj']',0}, 'waitConf'}; ...
    'dXgameHID', {[b,0*b], 'waitConf'}};

rU = @rVarUpdate;
cm = @compareEstimate;
mv = @moveLine;
rE = @resetEst;
pS = @rPlay
vI = @makConfVis

nxt = 'next';
err = 'error';
wmv = 'waitMove';
sd = 'slowDown';
su = 'slowUp';
fd = 'fastDown';
fu = 'fastUp';
dr = 'dXdistr';
rt = {'dXtext', 1, 'string'};
suc = 'slowUpC'
sdc = 'slowDownC'
fuc =  'fastUpC'
fdc = 'fastDownC'

t = true;
f = false;


% THE STATE DINNER. Careful -- this MUST be a double cellery.
%
%   You know those guitars that are like *double* guitars?
%
%   name        fun args        jump    wait    repsDrawQuery   cond
arg_dXstate = {{ ...
    'reset',    rE, {1, varargin{1}, 12},nxt,0,     0,  3,  0,      {};
    'waitMove', {}, {},         'end',  6e4,    0,  3,  waitMove,{}; ...
    'slowDown', mv, {2, 2, -1, t, 12, []}, sd,  150,    0,  3,  goBack, {}; ...
    'slowUp',   mv, {2, 2, +1, t, 12, []}, su,  150,    0,  3,  goBack, {}; ...
    'fastDown', mv, {2, 2, -1, t, 12, []}, fd,  0,      0,  3,  goBack, {}; ...
    'fastUp',   mv, {2, 2, +1, t, 12, []}, fu,  0,      0,  3,  goBack, {}; ...
    ...
    
  
    'beep',     pS, {'dXsound', 6}, nxt , 0,    0,  0,  0,            {}; ...
    'vis',      vI, {12},        nxt,    0,     0,  3,  0,            {}; ...
    'waitConf', {}, {},         'end',    6e4,    0,  3,  waitConf,{}; ...
    'slowDownC', mv, {12, 11, -1, t, [], []}, sdc,  150,    0,  3,  goBackC, {}; ...
    'slowUpC',   mv, {12, 11, +1, t, [], []}, suc,  150,    0,  3,  goBackC, {}; ...
    'fastDownC', mv, {12, 11, -1, t, [], []}, fdc,  0,      0,  3,  goBackC, {}; ...
    'fastUpC',   mv, {12, 11, +1, t, [], []}, fuc,  0,      0,  3,  goBackC, {}; ...    
    'newNumber',rU, {dr},       nxt,    0,      0,  0,  0,      {}; ...
    'newLine',  mv, {1, 1, rt, f, [], varargin{2}}, nxt, 0,      0,  0,  0,      {}; ...
    'compare',  cm, {6, 1}, nxt,0,    0,  3,  0,      {}; ...
    'end',      {}, {},         'x',    0,      0,  0,  0,      {}; ...
  
    }};
sz = size(arg_dXstate{1}, 1);

tony = {'current', true, true, false};
states_ = {'dXstate', sz, tony, arg_dXstate};